using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ImageAnalystTools._ClassificationandPatternRecognition
{
    /// <summary>
    /// <para>Linear Spectral Unmixing</para>
    /// <para>Performs subpixel classification and calculates the fractional abundance of different land cover types for individual pixels.</para>
    /// <para>执行子像素分类并计算单个像素的不同土地覆被类型的分数丰度。</para>
    /// </summary>    
    [DisplayName("Linear Spectral Unmixing")]
    public class LinearSpectralUnmixing : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public LinearSpectralUnmixing()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input Raster</para>
        /// <para>The input raster dataset.</para>
        /// <para>输入栅格数据集。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output Raster</para>
        /// <para>The output multiband raster dataset.</para>
        /// <para>输出多波段栅格数据集。</para>
        /// </param>
        /// <param name="_in_spectral_profile_file">
        /// <para>Input Training Features or Spectral Profile</para>
        /// <para><xdoc>
        ///   <para>The spectral information for the different land cover classes.</para>
        ///   <para>This can be provided as polygon features, a training sample feature class generated from the Training Samples Manager, a classifier definition file (.ecd) generated from the Train Maximum Likelihood Classifier tool, or a JSON file (.json) that contains the class spectral profiles.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>不同土地覆被类别的光谱信息。</para>
        ///   <para>这可以作为面要素、从训练样本管理器生成的训练样本要素类、从训练最大似然分类器工具生成的分类器定义文件 （.ecd） 或包含类谱轮廓的 JSON 文件 （.json） 的形式提供。</para>
        /// </xdoc></para>
        /// </param>
        public LinearSpectralUnmixing(object _in_raster, object _out_raster, object _in_spectral_profile_file)
        {
            this._in_raster = _in_raster;
            this._out_raster = _out_raster;
            this._in_spectral_profile_file = _in_spectral_profile_file;
        }
        public override string ToolboxName => "Image Analyst Tools";

        public override string ToolName => "Linear Spectral Unmixing";

        public override string CallName => "ia.LinearSpectralUnmixing";

        public override List<string> AcceptEnvironments => ["compression", "configKeyword", "extent", "geographicTransformations", "nodata", "outputCoordinateSystem", "parallelProcessingFactor", "pyramid", "rasterStatistics", "resamplingMethod", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_raster, _in_spectral_profile_file, _value_option];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The input raster dataset.</para>
        /// <para>输入栅格数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output Raster</para>
        /// <para>The output multiband raster dataset.</para>
        /// <para>输出多波段栅格数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Input Training Features or Spectral Profile</para>
        /// <para><xdoc>
        ///   <para>The spectral information for the different land cover classes.</para>
        ///   <para>This can be provided as polygon features, a training sample feature class generated from the Training Samples Manager, a classifier definition file (.ecd) generated from the Train Maximum Likelihood Classifier tool, or a JSON file (.json) that contains the class spectral profiles.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>不同土地覆被类别的光谱信息。</para>
        ///   <para>这可以作为面要素、从训练样本管理器生成的训练样本要素类、从训练最大似然分类器工具生成的分类器定义文件 （.ecd） 或包含类谱轮廓的 JSON 文件 （.json） 的形式提供。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Training Features or Spectral Profile")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_spectral_profile_file { get; set; }


        /// <summary>
        /// <para>Output Value Option</para>
        /// <para><xdoc>
        ///   <para>Specifies how the output pixel values will be defined.</para>
        ///   <bulletList>
        ///     <bullet_item>Sum to one—Class values for each pixel will be provided in decimal format with the sum of all classes equal to 1. For example, Class1 = 0.16; Class2 = 0.24; Class3 = 0.60.</bullet_item><para/>
        ///     <bullet_item>Non-negative—There will be no negative output values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何定义输出像素值。</para>
        ///   <bulletList>
        ///     <bullet_item>总和为 1—每个像素的类值将以十进制格式提供，所有类的总和等于 1。例如，Class1 = 0.16;第 2 类 = 0.24;第 3 类 = 0.60。</bullet_item><para/>
        ///     <bullet_item>非负 - 不会有负输出值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Value Option")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _value_option { get; set; } = null;


        public LinearSpectralUnmixing SetEnv(object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object nodata = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object pyramid = null, object rasterStatistics = null, object resamplingMethod = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, nodata: nodata, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, pyramid: pyramid, rasterStatistics: rasterStatistics, resamplingMethod: resamplingMethod, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}